package com.clms.system.pojo.entitry;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Api(value = "Menu菜单",description = "菜单表")
public class SysMenu {
  @TableId(value = "menu_id",type = IdType.AUTO)
  @ApiModelProperty(value = "菜单id")
  private long menuId;
  @ApiModelProperty(value = "菜单名称")
  private String menuName;
  @ApiModelProperty(value = "父id")
  private long parentId;
  @ApiModelProperty(value = "**")
  private long orderNum;
  @ApiModelProperty(value = "url路径")
  private String url;
  @ApiModelProperty(value = "菜单类型")
  private String menuType;
  @ApiModelProperty(value = "**")
  private String visible;
  @ApiModelProperty(value = "**")
  private String perms;
  @ApiModelProperty(value = "图标")
  private String icon;
  @ApiModelProperty(value = "更新人")
  private String createBy;

  @ApiModelProperty(value = "**")
  private String updateBy;
  @DateTimeFormat(pattern="yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd")
  @ApiModelProperty(value = "创建时间")
  @TableField(fill = FieldFill.INSERT)
  private Date createTime;
  @ApiModelProperty(value = "更新时间")
  @DateTimeFormat(pattern="yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd")
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Date updateTime;
  @ApiModelProperty(value = "评论")
  private String remark;
  @ApiModelProperty(value = "子菜单")
  @TableField(exist =false)
  private List<SysMenu> children;
}
